package com.darwin.darwinIsometric.core
{
	import com.darwin.darwinBitmapEngine.core.INode;
	import com.darwin.darwinBitmapEngine.core.INodeList;
	
	/**
	 * 存储isoObject 的列表
	 * @author lipi
	 */
	public class IsoList implements INodeList
	{
		public function IsoList()
		{
			_nodeList = [];
		}
		
		public function get list():Array
		{
			return _nodeList;
		}
		
		//存储显示对象的列表 
		private var _nodeList:Array;
		
		public function get length():int
		{
			return _nodeList.length;
		}
		
		public function push(node:INode):void
		{
			if(node is IsoObject)
			{
				_nodeList.push(node as IsoObject);
			}
		}
		
		public function splice(startIndex:int, deleteCount:int,item:INode = null):void
		{
			if(item)
			{
				_nodeList.splice(startIndex,deleteCount,item);
			}else{
				_nodeList.splice(startIndex,deleteCount);
			}
		}
		
		public function getNodeAt(index:int):INode
		{
			return _nodeList[index];
		}
	}
}